package com.yycwxt.modules.admin.bcf;

import com.yycwxt.domain.Bcf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.mapping.StatementType;
import java.util.List;
import java.util.Map;


/**
 * Created by Mr.Zhang on 2022/9/2 16:06
 */
@Mapper
public interface BcfMapper {


    // 查询账期
    @Select("SELECT distinct account_date FROM core_flows")
    Object[] selectZq();

    // 按照账期查询全部   mybatis 动态sql
    @SelectProvider(type = BcfSelectProvider.class, method = "bcfSql")
    List<Map<String, Object>> selectBcf(Map<String, Object> map);


    // 使用存储过程插入数据
    // @param map
    @Select("call generateBcf(#{zq, mode=IN, jdbcType=VARCHAR})")
    void generateBcf(int zq);

    // 下载源文件
    @Select("select url from imp_files where remark like '%包材费用%'")
    List<String> getUrl();


}
